package com.cq.service.Impl;

import com.cq.dao.BuildDao;
import com.cq.pojo.Building;
import com.cq.pojo.Dorm;
import com.cq.service.BuildService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lap
 * @version 1.0
 * @date 2021/8/15 14:03
 */

@Service
public class BuildServiceImpl implements BuildService {

    @Autowired
    private BuildDao buildDao;

    @Override
    public List<Building> selectAllBuildName() {
        return buildDao.selectAllBuildName();
    }

    @Override
    public List<Building> build_id(String build_Name) {
        return buildDao.build_id(build_Name);
    }

    @Override
    public List<Dorm> selectAllDorm(Integer build_id) {
        return buildDao.selectAllDorm(build_id);
    }

    @Override
    public int addBuilding(Building building) {
        int result = buildDao.addBuilding(building);
        return result;
    }

    @Override
    public int editBuilding(Building building) {
        int result = buildDao.editBuilding(building);
        return result;
    }

    @Override
    public int delBuilding(int build_id) {
        int result = buildDao.delBuilding(build_id);
        return result;
    }
}
